//
// Created by Administrator on 2025/9/13.
//

#ifndef INC_12_FREERTOS_LWIP_MQTT_NEWLAND_SYSTEM_STATUS_H
#define INC_12_FREERTOS_LWIP_MQTT_NEWLAND_SYSTEM_STATUS_H
#include "main.h"
#include <time.h>

typedef struct {
    bool wifi_status;
    bool eth_status;
    bool ble_status;
}network_status_t;

typedef struct {
    char model[16];
    char version[16];
    char uptime[32];
    uint8_t sensor_num;
    network_status_t network_status;
    bool ntp_status;
    // time_t timestamp;
    // struct tm time;
}system_info_t;
extern system_info_t system_info;

void sys_info_daemon(void * pvParameters);

void sys_get_time(struct tm * time);

void sys_set_time(struct tm * time);

void sys_set_eth_status(bool status);

bool sys_get_eth_status(void);

void sys_set_ble_status(bool status);

bool sys_get_ble_status(void);

void sys_set_wifi_status(bool status);

bool sys_get_wifi_status(void);

void sys_get_time_struct(struct tm *time);

void sys_set_ntp_status(bool status);

bool sys_get_ntp_status(void);


#endif //INC_12_FREERTOS_LWIP_MQTT_NEWLAND_SYSTEM_STATUS_H